public class Main {
    public static void main(String[] args) {
        ConcreteMediator mediator = new ConcreteMediator();

        Button addButton = new Button();
        Button deleteButton = new Button();
        List customerList = new List();
        ComboBox customerComboBox = new ComboBox();
        TextBox customerTextBox = new TextBox();

        addButton.setMediator(mediator);
        deleteButton.setMediator(mediator);
        customerList.setMediator(mediator);
        customerComboBox.setMediator(mediator);
        customerTextBox.setMediator(mediator);

        mediator.setAddButton(addButton);
        mediator.setDeleteButton(deleteButton);
        mediator.setCustomerList(customerList);
        mediator.setCustomerComboBox(customerComboBox);
        mediator.setCustomerTextBox(customerTextBox);

        customerTextBox.setText("客户A");
        addButton.click();
        customerTextBox.setText("客户B");
        addButton.click();


        deleteButton.click();
    }
}
